<?php
//Authors of this code include Saori Takasaki and Jon Rivera.
        
include 'product_data.inc';

//This form will direct users to the login page.
echo "<form action = 'login.php' method = 'post'>";

//This displays the first row of the table.
print '<table border="1" cellpadding="5" cellspacing="0">' ;
print '<th>Product</th> <th>Name</th> <th>Price</th> <th>Quantity</th>';

//This displays the table with a for loop.
for ($i= 0; $i < count($products); $i++)
    
	{
		 print '<tr>';
		 print "<td>{$products[$i]['Product']}</td>";
		 print "<td>{$products[$i]['Name']}</td>";
		 print "<td>{$products[$i]['Price']}</td>";
		 print "<td><input type= 'text' name= 'quantity$i'>";
		 print '</tr>';

	}

	print '</table>';

print "<br>";

// This creates a submit button that users use to send data.
print "<input type= 'submit' name= 'submit_button' value= 'Submit'>";

echo "</form>";
?>